package com.qianli.cashmama.product.server.controller;

import com.fqgj.log.factory.LogFactory;
import com.fqgj.log.interfaces.Log;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * User: sm
 * Date: 2020-11-26
 * Time: 14:29
 */
@RestController
public class DdPushController {

    private static final Log logger = LogFactory.getLog(DdPushController.class);

    @RequestMapping(value = "/dd/agent/push")
    @ResponseBody
    public String ddPush(@RequestBody DdPushRequest request) {
        DingTalkPushUtils.pushTextMessageAtAll(request.getDdUrl(), request.getContent());
        return "ok";
    }

}
